/*
 * @Author: 周海 zhouhaib@yonyou.com
 * @Date: 2022-10-04 01:05:47
 * @LastEditors: Zhouhai 497675647@qq.com
 * @LastEditTime: 2023-02-10 13:37:20
 */
import { action, makeAutoObservable, observable, observe } from 'mobx';

class CounterStore {
    //全局loading
	counter: number = 0;

	constructor() {
		makeAutoObservable(this,{
            counter: observable,
            add: action,
            sub: action
        });
	}



    add = () =>{
        this.counter++
    }


    
    sub = () =>{
      this.counter--
    }


}
export {CounterStore};